#define _CRT_SECURE_NO_WARNINGS 1
#pragma warning(disable:4996)
#include<stdio.h>
int L(int n) {
    if (n < 1) return 1;
    else return n * L(n - 1);
}
int main(){
    int n;
    scanf("%d", &n);
    int i = 1;
    int result=1;
    int result1 = 1;
    for (; i <= n; i++) {
        result *= i;
    }
    result1=L(n);
    printf("%d %d", result,result1);
    
    return 0;
}